package com.skyworth.plugin.parser.jni;


import com.coocaa.x.framework.utils.LogUtils;

public class videoparse {

    static {
        LogUtils.i("plugin", "videoparse!!!");
        String version = DownloadPlayerPlugin.getInstance().getOldVersion();
        String soPath = DownloadPlayerPlugin.getSOPath();
        LogUtils.i("plugin", "before load so version:" + version + "  path:" + soPath);
        if (version.equals("") || version.equals("0")) {
            // System.load("/data/data/com.tianci.appstore/lib/libvideoparse.so");
            LogUtils.i("plugin", "load default so");
            try {
                System.loadLibrary("videoparse");
            } catch (Exception e) {
                LogUtils.i("plugin", "load  so exception");
                String defaultPath = DownloadPlayerPlugin.getSODefaultPath();
                System.load(defaultPath + "libvideoparse.so");
            }
        } else
            System.load(soPath + "libvideoparse.so");
        LogUtils.i("plugin", "load so success");
    }

    public native videoinfo getParse(String unparsedurl);

    public native void stopParse();

    public native String getVersion();

}
